de.ueberdosis.mp3info
Class ID3Tag

java.lang.Object
  |
  +--de.ueberdosis.mp3info.ID3Tag
All Implemented Interfaces:
Defines
Direct Known Subclasses:
ExtendedID3Tag

public class ID3Tag
extends java.lang.Object
implements Defines

Contains the information a ID3 V1 tag has


Field Summary
static java.lang.String[] genres
          String representation of all curently used genres
 
Fields inherited from interface de.ueberdosis.mp3info.Defines
DEFAULT_ENCODING, ID3V2_FOOTER_SIZE, ID3V2_FRAME_HEADER_SIZE, ID3V2_HEADER_SIZE, ID3V2_X_HEADER_SIZE, MP3_FRAME_HEADER_SIZE, SUPPORTED_NUMBER_OF_EXTENDED_FLAG_BYTES, testPositions, VERSION
 
Constructor Summary
ID3Tag()
           
ID3Tag(byte[] tagBytes)
          tagBytes is an Array of 128 bytes containing the proposed ID3Tag.
ID3Tag(de.ueberdosis.mp3info.ID3Tag tag)
          Creates a copy of an existing tag
 
Method Summary
 java.lang.String getAlbum()
           
 java.lang.String getArtist()
           
 java.lang.String getComment()
           
 byte getGenre()
           
 java.lang.String getGenreS()
           
 java.lang.String getTitle()
           
 byte getTrack()
           
 java.lang.String getTrackS()
           
 java.lang.String getYear()
           
 boolean isValidTag()
          Gives information if this tag seems to be valid.
 void setAlbum(java.lang.String alb)
          Sets the name of the album
 void setArtist(java.lang.String art)
          Sets the artist of the mp3
 void setComment(java.lang.String c)
          Sets a comment to the tag
 void setGenre(byte g)
          Sets the genre of the song
 void setGenre(int g)
           
 void setTitle(java.lang.String tit)
          Sets the title of the mp3
 void setTrack(byte t)
           
 void setTrack(int t)
           
 void setYear(java.lang.String y)
          Sets the release-year of the original song
 byte[] toByteArray()
          creates an ID3-Tag that can directly be written to a file
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

genres

public static final java.lang.String[] genres
String representation of all curently used genres

Constructor Detail

ID3Tag

public ID3Tag(byte[] tagBytes)
tagBytes is an Array of 128 bytes containing the proposed ID3Tag.


ID3Tag

public ID3Tag()

ID3Tag

public ID3Tag(de.ueberdosis.mp3info.ID3Tag tag)
Creates a copy of an existing tag

Method Detail

getTitle

public java.lang.String getTitle()
Returns:
Title of the mp3

setTitle

public void setTitle(java.lang.String tit)
Sets the title of the mp3


getArtist

public java.lang.String getArtist()
Returns:
Artist of the mp3

setArtist

public void setArtist(java.lang.String art)
Sets the artist of the mp3


getAlbum

public java.lang.String getAlbum()
Returns:
Name of the album

setAlbum

public void setAlbum(java.lang.String alb)
Sets the name of the album


getYear

public java.lang.String getYear()
Returns:
release-year of the original song

setYear

public void setYear(java.lang.String y)
Sets the release-year of the original song


getComment

public java.lang.String getComment()
Returns:
Comment included in the tag

setComment

public void setComment(java.lang.String c)
Sets a comment to the tag


getGenre

public byte getGenre()
Returns:
the genre of the song

getGenreS

public java.lang.String getGenreS()
Returns:
String representation of the genre

setGenre

public void setGenre(byte g)
Sets the genre of the song


setGenre

public void setGenre(int g)

getTrack

public byte getTrack()
Returns:
Number of the on the album

getTrackS

public java.lang.String getTrackS()
Returns:
String representation of the number of the track

setTrack

public void setTrack(byte t)
Returns:
sets the number of the track

setTrack

public void setTrack(int t)

isValidTag

public boolean isValidTag()
Gives information if this tag seems to be valid. this is false only if this tag was generated from a ByteArray which was not a valid tag.


toByteArray

public byte[] toByteArray()
creates an ID3-Tag that can directly be written to a file